<?php if (!defined('THINK_PATH')) exit();?><html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <!-- <link href="../static/bootstrap/css/bootstrap-responsive.css" rel="stylesheet" type="text/css"/>
    <link href="../static/bootstrap/css/docs.css" rel="stylesheet" type="text/css"/>
    -->
   <link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css"/>
   <link href="/static/viewback/css/mycss.css" rel="stylesheet" type="text/css"/>
   <title>今日新帖</title>
</head>
<body>
<!--<div id="banner"><h2 style="color: blue">论坛后台管理系统</h2>

</div>
    <div class="row-fluid">
       <div style="margin-left:50px;margin-top: 10px;float: left">欢迎管理员<a href="/Admin/user/userInfo?id=<?php echo $_SESSION['userInfo']['id'] ?>"><?php if($_SESSION['userInfo']['role']=='管理员'){echo $_SESSION['userInfo']['username'];}else{header("location:/User/user/login");} ?></a>登录</div>
       <div style="float:right;margin-right: 20px;" class="navbar navbar-inner"> 
            <ul class="nav nav-pills" id="top-nav"> 
            <li  id="index"><a href="/User/forum/forum.html" target="_blank">论坛首页</a></li>
            <li class="divider-vertical"></li>
            <li  id="posts"><a href="/Admin/posts/postsList.html" target="_self">帖子管理</a></li>
            <li class="divider-vertical"></li>
            <li  id="user"><a href="/Admin/user/userList.html" target="_self">会员管理</a></li>
            <li class="divider-vertical"></li>
            <li  id="forum"><a href="/Admin/forum/forumList.html" target="_self">版块管理</a></li>
            <li class="divider-vertical"></li>
            <li  id="logout"><a href="/User/user/logout" target="_self"><i class="icon-off"></i>安全退出</a></li>
           </ul>
       </div>
    </div>

<!--<script type="text/javascript">
    $(document).ready(function(){
        $('li').mouseover(function(){
            $(this).addClass('active');
        });
        $('li').mouseout(function(){
            $(this).removeClass('active');
        });
    });
</script>-->
<script type="text/javascript" src="/static/viewback/js/jquery-1.8.3.js"></script>
<script type="text/javascript">
    var oplist = new Array('index', 'posts', 'user', 'forum', 'logout');
    $(document).ready(function() {
            $('#top-nav').find('a').mouseover(function() {
                    var id = $(this).attr('id');
                    $.each(oplist, function(i, n) {
                            $('#'+n).attr('class', 'inactive');
                    });
                    $(this).parents("li").attr('class', 'active');
            });
    });
</script>
<div class="container-fluid" style="font-weight: 700;">
    <div class="navbar navbar-inverse navbar-fixed-top" style="min-width: 1340px;">
        <div class="navbar-inner">
            <a class="brand" href="#">论坛后台管理系统</a>
            <div class="nav-collapse collapse">
                <p class="navbar-text pull-right" style="margin-right: 100px;">
                   欢迎管理员<a href="/Admin/user/userInfo?id=<?php echo $_SESSION['userInfo']['id'] ?>"><?php if($_SESSION['userInfo']['role']=='管理员'){echo $_SESSION['userInfo']['username'];}else{header("location:/User/user/login");} ?></a>登录
                </p>
               <ul class="nav nav-pills" id="top-nav"> 
                <li  id="index"><a href="/User/forum/forum.html" target="_blank">论坛首页</a></li>
                <li class="divider-vertical"></li>
                <li  id="user"><a href="/Admin/user/userList.html" target="_self">会员管理</a></li>
                <li class="divider-vertical"></li>
                <li  id="posts"><a href="/Admin/posts/postsList.html" target="_self">帖子管理</a></li>
                <li class="divider-vertical"></li>
                <li  id="forum"><a href="/Admin/forum/forumList.html" target="_self">版块管理</a></li>
                <li class="divider-vertical"></li>
                <li  id="logout"><a href="/User/user/logout" target="_self"><i class="icon-off"></i>安全退出</a></li>
               </ul>
            </div>
        </div>
    </div>
</div>
<br/>
<br/>


<ul class="breadcrumb">
    <li>
      <a href="/Admin/user/userList" title="后台管理"><i class="icon-home"></i></a> <span class="divider">/</span>
    </li>
    <li>
      <a href="/Admin/posts/postsList" title="帖子管理">帖子管理</a> <span class="divider">/</span>
    </li>
    <li class="active" title="今日新帖列表">今日新帖列表</li>
 </ul>

    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span2">
                <div class="well slidebar-nav" style="width:170px;height: auto">
    <ul class="nav nav-list nav-stacked nav-pills">
        <li class="nav-header">会员管理</li>
        <li><a href="/Admin/user/userList">会员列表</a></li>
        <li><a href="/Admin/user/userOnline">在线会员</a></li>
        <li><a href="/Admin/user/userDrop">账号删除</a></li>
        <li class="nav-header">帖子管理</li>
        <li><a href="/Admin/posts/postsList">主题列表</a></li>
        <li><a href="/Admin/posts/postsNew">今日新帖</a></li>
        <li><a href="/Admin/posts/postsGood">精华帖子</a></li>
        <li class="nav-header">版块管理</li>
        <li><a href="/Admin/forum/forumList">版块列表</a></li>
        <li><a href="/Admin/forum/forumAdd">板块增加</a></li>
        <li><a href="/Admin/forum/forumDelete">版块删除</a></li>
        <li class="nav-header">其他</li>
        <li><a href="/Admin/user/userResetPwd">密码重置</a></li>
        <li><a href="/Admin/forum/dataBack">数据备份</a></li>
        <li><a href="/User/user/logout">安全退出</a></li>
    </ul>
</div>
<script type="text/javascript">
    $(document).ready(function(){
        $('li').mouseover(function(){
            $(this).addClass('active');
        });
        $('li').mouseout(function(){
            $(this).removeClass('active');
        });
    });
</script>


   
      
            </div>
            <div class="span10">
                <div class="well">
                    <form class="form-inline" action="/Admin/posts/postsNew" method="get">
                        <label for="posts_id" class="control-label">帖子ID</label>
                        <input name="posts_id" type="text" id="posts_id" class="span3" placeholder="帖子ID" autofocus/>
                        <label for="theme" class="control-label">帖子主题</label>
                        <input name="theme" type="text" id="theme" class="span3" placeholder="帖子主题"/>
                        <label for="forum" class="control-label">版区</label>
                        <select name="forum_id">
                            <option  value="">
                                —选择版区—
                            </option>
                            <?php if(is_array($forumList)): $i = 0; $__LIST__ = $forumList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$forum): $mod = ($i % 2 );++$i; if($forum["id"] == $_GET['forum_id']): ?><option value="<?php echo ($forum["id"]); ?>" selected="selected"><?php echo ($forum["forum_name"]); ?></option>
                                <?php else: ?>
                                    <option value="<?php echo ($forum["id"]); ?>">
                                        <?php echo ($forum["forum_name"]); ?>
                                    </option><?php endif; endforeach; endif; else: echo "" ;endif; ?>
                        </select>
                        <input class="btn btn-success" type="submit" value="搜索"/>
                    </form>
                </div>
                    <fieldset>
                        <legend><h3>今日新帖</h3></legend>
                        <table class="table table-bordered  table-hover" style="width:1090px;height: auto;">
                            <thead>
                                <tr><th>ID</th><th>主题</th><th>作者</th><th>是否精华帖</th><th>发表时间</th><th>版区</th><th>操作</th></tr>
                            </thead>
                            <tbody>
                                <?php if(is_array($postsList)): $i = 0; $__LIST__ = $postsList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i;?><tr>
                                        <td><?php echo ($list["id"]); ?></td><td><?php echo ($list["theme"]); ?></td><td><?php echo ($list["author"]); ?></td></td><td><?php if($list["is_good"] == 'yes' ): ?><span class="label label-success">精华帖</span><?php else: ?><span class="label label-info">普通帖</span><?php endif; ?></td><td><?php echo ($list["dateline"]); ?></td><td><?php echo ($list["forum_name"]); ?></td>
                                        <td><a class="btn btn-success btn-mini" href="/Admin/posts/postsDetail?id=<?php echo ($list["id"]); ?>">查看</a>
                                            <br/><?php if($list["is_good"] == 'no' ): ?><a class="btn btn-warning btn-mini"  href="/Admin/posts/goodPosts?id=<?php echo ($list["id"]); ?>&url=postsNew&forum_id=<?php echo ($list["forum_id"]); ?>">精华</a><?php else: ?><a class="btn btn-mini"  href="/Admin/posts/cancelGood?id=<?php echo ($list["id"]); ?>&url=postsNew&forum_id=<?php echo ($list["forum_id"]); ?>">取消</a><?php endif; ?>
                                            <br/><a class="btn btn-danger btn-mini"  href="/Admin/posts/postsDrop?id=<?php echo ($list["id"]); ?>">删除</a>
                                        </td>
                                    </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                            </tbody>
                        </table>
                    <?php echo ($pagestring); ?>
                    </fieldset>
            </div>
        </div>
</div>

<div style="margin:5px 20px;">
	<div style="border-bottom: 1px solid silver"></div>
	<div style="padding:15px 0px;line-height:1.0;">
		<p>Copyright &copy;2012-2013 shaobo,test</p>
		<p>Welcome to our Bulletin Board System.It is our <strong>beta</strong> version,contact <a href="mailto:shaaoboo@sina.com"><font color='blue'>shaaoboo@sina.com</font></a> to give us your valuable suggestion.</p>
	</div>
</div>

<script type="text/javascript" src="/static/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="/static/viewback/js/jquery-1.8.3.js"></script>
<script type="text/javascript">
   $(document).ready(function(){
        $('.btn-danger').click(function(){
           return confirm('确定删除？')            
        });
    });
</script>
</body>
</html>